<template>
	<view>
		<view class="flex justify-between padding">
			<view class="" @click="handleSend">草莓蛋糕</view>
			<view class="">购物车按钮{{ num }}</view>
		</view>
		<test-my-comp name="Daidong" @onNum="handleNum"></test-my-comp>
	<tab-custom></tab-custom>
	</view>	
</template>

<script>
import testBus from '../../bus/testBus.js';
export default {
	data() {
		return {
			num: 100
		};
	},
	methods: {
		handleNum(n) {
			console.log(n);
			this.num += n;
		},
		handleSend() {
			testBus.$emit('sendData', { msg: 'hello', num: 123 });
		}
	}
};
</script>

<style lang="scss">
//
</style>
